<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <table id="sampleTable" border="1" itemid="table_id">
    <tr>
      <td>Row1 cell1</td>
      <td>Row1 cell2</td>
    </tr>
    <tr id="tr">
      <td>Row2 cell1</td>
      <td>Row2 cell2</td>
    </tr>
  </table>
  <div></div>

  <button onclick="button()">按钮</button>
  <script>
    function button() {
      var tab = document.querySelector('table')
      tab.innerHTML += '<tr><td>新增01</td><td>新增02</td></tr>'
    }


  </script>
  </script>
</body>

</html>